package com.touzbi.hss.parametermanager;

import javax.servlet.http.HttpServletRequest;

public class HttpParameterManager implements AbstractParameterManager {

	private HttpServletRequest req;

	public HttpParameterManager(HttpServletRequest req) {
		this.req = req;
	}

	@Override
	public String getParamValue(String paramName) {
		String paramValue;
		try {
			paramValue = this.req.getParameter(paramName);
			if (paramName.isEmpty() || paramValue.isEmpty()) {
				return null;
			}
		} catch (Exception e) {
			return null;
		}
		return paramValue;
	}

}
